An Alternative Structure for the Abstract Factory Software Design Pattern
نویسنده
چکیده
The abstract factory design pattern is a well known and widely applied design in the construction of object-oriented software. An amendment to the abstract factory is presented based on the \envelope/letter" idiom. This results in factory products being instantiated in application code in a manner apparently independent of the factory pattern. Application code can thus forget about the factory, and concentrate on using the product objects. E ort in library design thus bene ts application structure, always a worthy end result in program design. For C++ users, the resulting pattern makes factory-generated objects more amenable to language features including operator overloading and memory management.
منابع مشابه
Automatic Recommendation of Software Design Patterns Using Anti-patterns in the Design Phase: A Case Study on Abstract Factory
Anti-patterns, one of the reasons for software design problems, can be solved by applying proper design patterns. If anti-patterns are discovered in the design phase, this should lead an early pattern recommendation by using relationships between antiand design patterns. This paper presents an idea called Antipattern based Design Pattern Recommender (ADPR), that uses design diagrams i.e. class ...
متن کاملA Study on Detecting Refactoring Opportunities to Introduce the Abstract Factory Design Pattern in Object-Oriented Code
In the world of software systems, the process of evolving is an essential one. If this process represents no challenge on small systems, it becomes unbearable if the size of the system exceeds a certain limit. Therefore, the need arises for software tools that can carry out the necessary transformations automatically. This paper addresses the possibility to detect spots within an object-oriente...
متن کاملDesign and Use of Industrial Software Architectures
Factory. The abstract factory pattern provides an interface to creating a family of related objects without specifying their concrete classes. Often when using reusable software, such as object-oriented frameworks, selecting one type of component in part of the framework restricts the selection of component types in other parts of the framework. The typical example are user-interface frameworks...
متن کاملImproving Design Patterns by Description Logics: A Use Case with Abstract Factory and Strategy
This paper deals with problems in common design patterns and proposes description-logics-based modeling to remedy these issues. We exploit the TwoUse approach, which integrates OWL-DL, a W3C standard for description logics on the web, and UML-based modeling, to overcome drawbacks of the Strategy Pattern, that are also extensible to the Abstract Factory Pattern in a Model Driven Approach. The re...
متن کاملA Modern, Compact Implementation of the Parameterized Factory Design Pattern
I propose a modern OO language update of the Parameterized Factory Creational Pattern [Gamma95]. It is compact since it folds the Factory method into an abstract base class, and imposes a package structure on its concrete subclasses. The design is demonstrated in Java, but is also applicable to C# and other modern object-oriented languages.
متن کامل